//
// Created by jinyf on 2022/3/2.
//
#include <jni.h>
#include "AndroidLog.h"


#ifndef INC_54_FFMPEG_MP3PLAYER_MNCALLJAVA_H
#define INC_54_FFMPEG_MP3PLAYER_MNCALLJAVA_H

#define MAIN_THREAD 0
#define CHILD_THREAD 1

class MNCallJava {
public:
    JavaVM *jVM=NULL;
    JNIEnv *jEnv=NULL;
    jobject jobj;

    jmethodID jmethodId_prepared;
    jmethodID jmid_timeinfo;

public:
    MNCallJava(JavaVM *jVm, JNIEnv *jEnv, jobject *jobj);
    ~MNCallJava();

    void onCallPrepared(int type);

    void onCallTimeInfo(int type, int curr, int total);
};


#endif //INC_54_FFMPEG_MP3PLAYER_MNCALLJAVA_H
